package shop;


public class Order {
    private Customer customer;
    private int orderNum;
    private double totlePrice;

    public Order(Customer customer, int orderNum, double totlePrice) {
        super();
        this.customer = customer;
        this.orderNum = orderNum;
        this.totlePrice = totlePrice;
    }

    //展示订单信息
    public void showOrder() {
        Mall.cart.showGoodsItem();//商品信息
        System.out.println("总商品个数为: " + orderNum);
        System.out.println("Customer: " + customer.getName());
        System.out.println("Telephone: " + customer.getTele());
        System.out.println("Address: " + customer.getAddress());
    }

    //确认订单
    public void confirmOrder() {
        System.out.println("请支付：" + totlePrice);
        Mall.cart.item.clear();//清空商品条目

    }

    //取消订单
    public void confirm() {
        Mall.cart.item.clear();//清空商品条目
    }
}
